home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-26 | 10.7 KB | 218 lines | [ttro/ttxt] |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Q&A #11
- Viewers Versus Editors, and Some Clarifications
-
- By the Apple Computer OpenDoc Human Interface Team
-
- As published in the March 1996 Apple Directions
-
- The OpenDoc human interface team frequently receives questions about OpenDoc
- that we need to answer in a public forum to help our partners' OpenDoc
- development efforts. We think you should know about the topics these
- questions address.
-
- But first, a correction. There was an error in our answer to the second
- question in last January's "OpenDoc Human Interface FAQs" article. Since the
- OpenDoc shell implements Close, Save, and Save As, the root part is never
- given a chance to handle these events. This error in the article shouldn't
- affect how you implement your editors, however.
-
- And now to this month's questions.
-
- Q: Why do we have part viewers, how do they work, and what are they supposed
- to do? I'm confused about how they differ from part editors.
-
- A: Viewers are a boon to users who don't have the editor required to
- manipulate some particular content. The purpose of a viewer is to allow
- users to preserve the appearance, at the highest possible fidelity, of the
- content in a document. An editor, of course, preserves this fidelity and
- gives the user the ability to manipulate the content. A viewer is not
- intended as a mechanism to "lock" a document and prevent it from being
- changed; instead, the viewer is one mechanism for enabling the user to see
- the content when the user doesn't own the appropriate part editor.
- (Translation--that is, allowing an appropriate part editor to translate and
- display the content--is another mechanism, but the content may lose
- something in translation.)
-
- You may, in fact, want to provide a part viewer as a promotion for your
- product--it's free for the user, it's easy for you to provide once your
- editor is market-ready, and it allows users to see what content they could
- create if they had your editor.
-
- A viewer allows users to see and print all of the content of a document, and
- to view existing content in standard formats (for example, QuickTime movies,
- QuickDraw 3D objects, and bitmapped graphics). A viewer does not allow users
- to make changes that can be saved, but it may allow minor temporary edits,
- such as formatting or font changes. While the content that is intrinsic to
- the viewer may not be manipulated, any content embedded within a viewer, for
- which you have an editor, may be fully manipulated.
-
- Because a viewer doesn't have all the functionality of the corresponding
- editor, you should simplify your viewer's menus by removing (not just
- dimming) the menu items that are exclusive to the editor.
-
- Q: I'm making an editor and a viewer for my part. Are there any guidelines
- for naming these items?
-
- A: Remember that end-users will use stationery pads (in the Stationery
- folder) to create new parts. So, first we'll remind you of the guidelines
- for stationery names.
-
- The name of a stationery pad should indicate its purpose. For example, a
- stationery pad that creates a medical form might be named Medical Form. For
- stationery pads that have no initial content, use the name of the category
- or the product name. For example, you might call a graphics part stationery
- pad either Drawing (its category name) or SurfDraw (its product name). Do
- not use the word stationery in the name.
-
- By the way, many of our sample parts are using incorrect names for their
- stationery pads. This error will be fixed in the next release; we're sorry
- we missed it this time. For part editors, we suggest you use just the
- product name--for example, SurfWriter. Part viewers should have the word
- Viewer appended to the name--for example, SurfDraw Viewer. If your current
- application uses the term Player, then for consistency, you can continue to
- use the term Player, but you should move to using the term Viewer as soon as
- possible.
-
- Remember that editors and viewers have slightly different icons. Read
- Chapter 12 of the OpenDoc Programmer's Guide for details.
-
- Q: What happens if I have the editor for content that is embedded in a
- viewer?
-
- A: In a word, if you have an editor, it will work on its own content,
- whether that content is embedded in a viewer or not. Consider the case in
- which only a viewer is present for a compound document's container, but the
- user has all the necessary editors for the document's embedded content. The
- embedded content can be changed, but the container's intrinsic content can
- only be viewed.
-
- What? A viewer that lets me change things inside it? Here's the distinction:
- The viewer only affects its own intrinsic content; any content embedded
- within it, for which the user does have the appropriate editor, may be fully
- manipulated.
-
- Q: What operations should my viewer support?
-
- A: You'll find these operations discussed in Chapter 12 of the OpenDoc
- Programmer's Guide. Your viewer should be able to read, display, and print
- its content. We also recommend that your viewer support selection, so that
- users can access Part Info or Link Info on embedded parts or links; this
- gives users more flexibility for changing editors for embedded parts. You
- also may want to allow users to drag content and parts out of your part, so
- that they can copy content to the Finder or to other documents. Remember
- that, in general, a single click should always activate the part and not
- select it; this guideline still applies when an viewer is being used.
-
- Viewers should support all the commands in the Document menu except Insert.
- In the Edit menu, viewers should remove the Cut, Paste, Paste As, and Clear
- commands. In addition, a viewer should not support drag-and-drop operations
- that would modify or remove content. For example, don't allow the user to
- select some content and drag it to the Trash. Some viewers now allow this,
- but this is a bug. (We forgot to mention this case in the OpenDoc
- Programmer's Guide).
-
- We'd like to reiterate that a viewer should not be capable of adding,
- embedding, or removing content from a part. Only an editor should have those
- capabilities. As we said earlier, your viewer should also remove any other
- content-editing commands in menus displayed by your editor. If you enable
- any editing commands in the menu bar, make sure you notify the user that any
- changes made will not be saved.
-
- Q: Why can't I paste or drag and drop into a part handled by a viewer?
-
- A: With today's application-based viewers (Adobe Acrobat, for example),
- you're allowed to change the content of what you're looking at by completely
- replacing it. If you did that with OpenDoc viewers, you'd lose any embedded
- content. To prevent the loss of data, your viewer would need to follow all
- the rules for merging and embedding content. Once you provide this support,
- you have an editor (albeit one with limited capabilities) instead of a
- viewer.
-
- Here's an example you may be familiar with. The PictureViewer part editor
- supplied with OpenDoc originally allowed a paste (or drop) of a new picture
- into the part; this replaced all the content. Although it appears that this
- behavior was popular, it was wrong and, after much debate, Apple changed
- PictureViewer so that it could no longer replace the graphics being viewed.
-
- You may decide that your viewer will not support embedded content. In this
- case, you might think that, since you don't allow other content to be
- embedded in your viewer, you can support your viewer changing content
- because that would never be destructive--there would never be loss of
- embedded content. However, whether you support embedded content or not, we
- strongly suggest that all viewers should present a consistent user
- experience --namely, that the user can add content to a part using an editor
- but not using a viewer.
-
- After all, a viewer is a viewer--and not an editor. If you're providing more
- functionality to your viewer, then perhaps you're really delivering a
- low-level editor and should reconsider how you structure and name your part.
-
- Q: I plan to write a simple text editor. I will support plain but not styled
- text during drag and paste operations. This means that, if I follow your
- previous guidelines (see "OpenDoc Human Interface FAQs" in the October 1995
- issue), I will have to display an alert each time content is added to my
- part, to inform the user that some formatting or content may be lost. For
- repetitive drag or paste operations, it could become really annoying for
- users to have to continually dismiss the alert. Is this what you intended?
-
- A: We think you've got a very good point, and we have accordingly modified
- our guidelines (hey, we're always open to suggestions!). In our October 1995
- article, we recommended that part editors display an alert to notify the
- user that some data might be lost during a copy operation. When your
- question came in, we thought about this situation some more and agreed that
- in some cases it could be very irritating to the user to have the alert
- displayed repeatedly. Therefore, we still believe in principle that
- notifying the user of loss of data is a good idea, but that consistent
- notification is problematic in a number of ways.
-
- Because of this, there are times when this guideline may not apply to you;
- please use your best judgment. And the situation may not be that
- critical--after all, most of today's applications do not alert the user when
- data or formatting is lost, and users seem to easily recognize when they
- have lost data or formatting. With the multiple-level "undo" support in
- OpenDoc, the user can undo a drop or paste operation to safely revert to the
- state of the document before the attempted drop or paste operation.
-
- So, we need to clarify our previous guideline. Here's what we should have
- said:
-
- 1. If your editor chooses a part kind for a paste or drop operation, it must
- support it completely. For example, the part editor that is the destination
- for a paste or drop should not strip embedded content or links out of the
- data format. If you can't preserve the fidelity of the paste or drop, then
- you must choose a lower fidelity part kind. If there is no available lower
- fidelity part kind, then you must judge whether to accept the paste or drop
- and display an alert, or whether to reject the paste or drop.
-
- 2. Completely support the undo feature so that, if data is lost in a paste
- or drop operation, the user can undo the operation and recover the state of
- the document before the paste or drop operation.
-
- 3. We strongly recommend that your part editor support embedding. That way,
- if it can't do anything else, your editor will be able to accept the content
- as embedded content.
-
- So, we've been enlightened. The suggestion in our previous FAQ of always
- notifying the user through an alert is certainly not the correct advice.
- It's good general advice, but your particular situation may prompt you to
- follow some alternative.
-
- __________________________________________________________
-
- Copyright (c) 1996 by Apple Computer, Inc. All Rights Reserved.
-